--- lsdvd-0.10/lsdvd.c.jdw	2003-09-30 07:01:00.000000000 +1000
+++ lsdvd-0.10/lsdvd.c	2007-11-10 17:16:17.000000000 +1100
@@ -153,9 +153,9 @@
 
 	fclose (filehandle);
 
-	title[32] = '\0';
-	while(i-- > 2)
-	if(title[i] == ' ') title[i] = '\0';
+	while (i > 0 && title[i-1] == ' ')
+		i--;
+	title[i] = '\0';
 	return 0;
 }
 
